<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>关系脑图</title>
    <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='kmsjsmap.css') }}">
    <script src="{{ url_for('static', filename='jquery-1.10.2.js') }}"></script>
    <script src="{{ url_for('static', filename='kmsjsmap.js') }}"></script>
    <style>
        #jsmind_container {
            height: 1500px;
        }
    </style>
</head>
<body>
<div id="jsmind_container"></div>
<script type="text/javascript">
    $.ajax({
        type: "GET",
        url: "/master/relationalBrainMap",
        dataType: "json",
        success: function (data) {
            console.log(data.data);

            kmsjsmap.init({
                container: "jsmind_container",
                data: data.data,
                editable: false,
                onRelation: function (item) {
                    console.log('当前选择中的是', item)
                    kmsjsmap.setLinkStatus({
                        id: item.id,
                        isLink: item.data.isLink === true ? false : true
                    })
                }
            });
        }
    });


</script>
</body>
</html>